The Essence of AspectJ
نویسندگان
چکیده
In the construction of a large software system, it is inevitable that some aspects of program behavior will cut across the structure of the code. The changes that are needed to support a new feature, for example, may be spread across several different points in the original program, making them harder to maintain and harder to reuse. The designers of “aspect-oriented” programming languages aim to tackle these problems by introducing new language mechanisms to capture cross-cutting concerns. Their hope is that this will allow different aspects of a program to be captured as independent entities that can be woven together automatically to produce a complete program. In this paper, we focus on AspectJ, an aspect-oriented extension of Java that has been designed and implemented by a team at Xerox PARC to support an empirical assessment of aspect-oriented programming. The development of AspectJ has been driven largely by pragmatic concerns. Here, we provide a complimentary perspective by using interpreters, written in Haskell, to present a formal semantics for a simple aspect-oriented programming language, and so to distill the essence of AspectJ. This paper provides a firm semantic foundation for the design of aspect-oriented programming languages. It illustrates the flexibility that can be obtained by writing interpreters in a monadic style, but also challenges us to contemplate how the ideas of aspect-oriented programming might be applied to the design of future functional languages.
منابع مشابه
Expressing Design by Contract Principles using Aspects
This thesis deals with two methodologies in software construction: Aspect Oriented Programming and Design by Contract. It was already claimed that the design by contract methodology is an aspect of the software system. As such, a contract can be expressed in AOP terminology, and hence could be enforced using an aspect oriented based tool. The work presented here describes the enforcement proces...
متن کاملRelational Aspects for Context Passing Beyond Stack Inspection
In Java, context passing can be implemented by adding an argument to every method so that a value (i.e., context) is passed down the call stack to methods that require it. In AspectJ, context passing can be implemented by simply defining a pointcut with the cflow operator. In this article, we identify the essence of context passing in AspectJ, and generalize it beyond stack inspection. Our appr...
متن کاملThe abc Group Relational Aspects as Tracematches abc
The relationships between objects in an object-oriented program are an essential property of the program’s design and implementation. Two previous approaches to implement relationships with aspects were association aspects, an AspectJ-based language extension, and the relationship aspects library. While those approaches greatly ease software development, we believe that they are not general eno...
متن کاملThe abc Group Relational Aspects as Tracematches abc Technical Report
The relationships between objects in object-oriented applications are an essential property of the program’s design and implementation. Two previous approaches to implement relationships with aspects were association aspects, an AspectJ-based language extension, and the relationship aspects library. While those approaches greatly ease software development, we believe that they are not general e...
متن کاملImplementing Known Concepts in AspectJ
AspectJ is a so-called general-purpose aspect-language which tries to solve the problem of crosscutting code. An often uttered criticism of AspectJ is that there is no underlying concept in the implemented language features and that those features are rather arbitrary chosen instead of being based on any theoretical foundations. This paper shows beyond the the context of crosscutting and tangli...
متن کامل